package com.sinosoft.dsp.component.bpm.viewbean.event.part;

import java.util.ArrayList;
import java.util.List;

import com.sinosoft.dsp.component.bpm.service.core.BpmSelectItemsService;
import com.sinosoft.dsp.component.bpm.viewbean.event.BpmAbstractActivityEventObject;
import com.sinosoft.dsp.component.bpm.viewbean.event.IBpmActivityEventObject;

public class BpmEventEventMailObject extends BpmAbstractActivityEventObject
		implements IBpmActivityEventObject {

	// 事件类别
	private String type = BpmSelectItemsService.SELECT_ITEM_EVENT_DEFINE_TYPE_MAIL;

	private String template;

	private BpmMailRecipientType from;

	private BpmMailRecipientType to;

	private BpmMailRecipientType cc;

	private BpmMailRecipientType bcc;

	private String subject;

	private String text;

	private String html;

	private List<BpmAttachmentObject> attachments = new ArrayList<BpmAttachmentObject>();

	public String getTemplate() {
		return template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}

	public BpmMailRecipientType getFrom() {
		return from;
	}

	public void setFrom(BpmMailRecipientType from) {
		this.from = from;
	}

	public BpmMailRecipientType getTo() {
		return to;
	}

	public void setTo(BpmMailRecipientType to) {
		this.to = to;
	}

	public BpmMailRecipientType getCc() {
		return cc;
	}

	public void setCc(BpmMailRecipientType cc) {
		this.cc = cc;
	}

	public BpmMailRecipientType getBcc() {
		return bcc;
	}

	public void setBcc(BpmMailRecipientType bcc) {
		this.bcc = bcc;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getHtml() {
		return html;
	}

	public void setHtml(String html) {
		this.html = html;
	}

	public List<BpmAttachmentObject> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<BpmAttachmentObject> attachments) {
		this.attachments = attachments;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public class BpmMailRecipientType {

		private String addresses;

		private String users;

		private String groups;

		public String getAddresses() {
			return addresses;
		}

		public void setAddresses(String addresses) {
			this.addresses = addresses;
		}

		public String getUsers() {
			return users;
		}

		public void setUsers(String users) {
			this.users = users;
		}

		public String getGroups() {
			return groups;
		}

		public void setGroups(String groups) {
			this.groups = groups;
		}

	}

	public class BpmAttachmentObject {
		private String url;

		private String resource;

		private String file;

		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}

		public String getResource() {
			return resource;
		}

		public void setResource(String resource) {
			this.resource = resource;
		}

		public String getFile() {
			return file;
		}

		public void setFile(String file) {
			this.file = file;
		}

	}
}
